Fix MDX components type error in blog page#240
Merged
hotlong merged 2 commits intocopilot/restructure-website-docsfrom Jan 26, 2026
Merged
Fix MDX components type error in blog page#240hotlong merged 2 commits intocopilot/restructure-website-docsfrom
hotlong merged 2 commits intocopilot/restructure-website-docsfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ents Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Restructure website documentation
Fix MDX components type error in blog page
Jan 26, 2026
9cd2682
into
copilot/restructure-website-docs
4 of 5 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a TypeScript compilation error that occurred during Vercel deployment when passing defaultMdxComponents directly to the MDX component in the blog page. The error was caused by a type incompatibility between React 19's FC<AnchorHTMLAttributes> and MDX component types.
Changes:
- Extract
defaultMdxComponentsinto a spread object before passing to the MDX component - Aligns blog page implementation with the existing pattern used in the docs page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TypeScript compilation failed on Vercel with
FC<AnchorHTMLAttributes>not assignable toNestedMDXComponents | Component<any>when passing fumadocs-ui'sdefaultMdxComponentsdirectly to MDX.Changes
defaultMdxComponentsinto new object before passing to MDX componentapps/docs/app/[lang]/docs/[[...slug]]/page.tsx)Type spreading resolves inference issue with React 19 + MDX component types.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.